Refactor git rev handling infrastructure
authorAlex Crichton <alex@alexcrichton.com>
Mon, 8 Dec 2014 18:46:07 +0000 (10:46 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 30 Dec 2014 00:00:18 +0000 (16:00 -0800)
commitaa256ffddc8c777d26fbdf51573a7d343a1783ac
tree95c1a188ce99ed115725e41b3b9f4987bdfd772c
parentb46015585bba8f4489f473e23df8ea4b8c66c8c0
Refactor git rev handling infrastructure

This commit unifies the notion of a "git revision" between a SourceId and the
GitSource. This pushes the request of a branch, tag, or revision all the way
down into a GitSource so special care can be taken for each case.

This primarily was discovered by #1069 where a git tag's id is different from
the commit that it points at, and we need to push the knowledge of whether it's
a tag or not all the way down to the point where we resolve what revision we
want (and perform appropriate operations to find the commit we want).

Closes #1069
src/bin/git_checkout.rs
src/cargo/core/mod.rs
src/cargo/core/source.rs
src/cargo/sources/git/source.rs
src/cargo/sources/git/utils.rs
src/cargo/util/toml.rs
tests/resolve.rs
tests/test_cargo_compile_git_deps.rs